<template>
    <div class="energyScore">
        <div class="top">
            <div style="font-size: 28px"
                ><img
                    src="@/assets/image/actuslConsumption/score.png"
                    style="margin-right: 12px"
                />{{ source.score }}<span style="font-size: 14px; margin-left: 8px">分</span></div
            >
            <span style="font-size: 16px">本月有效评价天数: {{ source.validDays }}天</span>
        </div>
        <div class="scoreItem">
            <div class="goodItem">
                <div class="title">
                    <span>优秀</span>
                    <span>{{ source.goodCount }}天</span>
                </div>
                <el-progress :percentage="source.goodPercentage" :show-text="false"></el-progress>
            </div>
            <div class="normalItem">
                <div class="title">
                    <span>正常</span>
                    <span>{{ source.normalCount }}天</span>
                </div>
                <el-progress :percentage="source.normalPercentage" :show-text="false"></el-progress>
            </div>
            <div class="overItem">
                <div class="title">
                    <span>超标</span>
                    <span>{{ source.overCount }}天</span>
                </div>
                <el-progress :percentage="source.overPercentage" :show-text="false"></el-progress>
            </div>
            <div class="noneItem">
                <div class="title">
                    <span>无数据</span>
                    <span>{{ source.noneCount }}天</span>
                </div>
                <el-progress :percentage="source.nonePercentage" :show-text="false"></el-progress>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: '',
        props: {
            source: Object,
        },
        data() {
            return {}
        },

        computed: {},
        methods: {},
    }
</script>

<style lang="scss" scoped>
    .energyScore {
        color: #ffffff;
        font-family:
            PingFangSC-Regular,
            PingFang SC;

        .top {
            width: 100%;
            height: 60px;
            background: linear-gradient(180deg, #08326d 0%, #0b2a64 100%);
            border-radius: 4px;
            border: 1px solid #1f53a5;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            margin-bottom: 20px;
        }
        .title {
            width: 100%;
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        .scoreItem {
            height: 260px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        ::v-deep {
            .el-progress-bar__outer {
                height: 10px;
                border-radius: 5px;
                background-color: #0c3b88;
            }
            .goodItem .el-progress-bar__inner {
                background: linear-gradient(90deg, rgba(0, 153, 183, 0.08) 0%, #00d5ff 100%);
            }
            .normalItem .el-progress-bar__inner {
                background: linear-gradient(90deg, rgba(0, 86, 183, 0.24) 0%, #007dff 100%);
            }
            .overItem .el-progress-bar__inner {
                background: linear-gradient(90deg, rgba(242, 52, 52, 0.25) 0%, #e22909 100%);
            }
            .noneItem .el-progress-bar__inner {
                background: linear-gradient(90deg, rgba(79, 94, 123, 0.52) 0%, #6e738a 100%);
            }
        }
    }
</style>
